What version will be chosen by MSXML2.XMLHTTP request, without version suffix? [migrated]
Posted
by
jayarjo
on Programmers
See other posts from Programmers
or by jayarjo
Published on 2011-11-18T19:31:04Z
Indexed on
2011/11/19
2:08 UTC
Read the original article
Hit count: 221
Microsoft
Probably every web developer is familiar with a pattern like this:
var xmlHttp = null;
if (window.XMLHttpRequest) {
// If IE7, Mozilla, Safari, and so on: Use native object.
xmlHttp = new XMLHttpRequest();
}
else
{
if (window.ActiveXObject) {
// ...otherwise, use the ActiveX control for IE5.x and IE6.
xmlHttp = new ActiveXObject('MSXML2.XMLHTTP');
}
}
But the question is - if there are multiple MSXML versions available on the client's PC (let's say 3.0, 5.0, 6.0), which one of them will be chosen by MSXML2.XMLHTTP call (notice no version suffix at the end)? Will it be the latest or - not necessarily?
And a side-question - is it possible to check which version was chosen?
© Programmers or respective owner